package com.fingerth.crawler.net.retrofit

import com.fingerth.crawler.bean.NovelChapterListBean
import com.fingerth.crawler.bean.NovelContentBean
import com.fingerth.crawler.bean.NovelListBean
import retrofit2.Call
import retrofit2.http.GET
import retrofit2.http.Path

interface HttpService {


    //option选择搜索项，标题：title ， 作者 ：author ，分类：fictionType
    //key搜索关键字，默认是模糊分词搜索
    @GET("fiction/search/{option}/{key}/{from}/{size}")
    fun onGetNovelList(@Path("option") option: String, @Path("key") key: String, @Path("from") from: Int, @Path("size") size: Int): Call<NovelListBean?>

    //http://api.pingcc.cn/fictionChapter/search/11602
    @GET("fictionChapter/search/{fictionId}")
    fun onGetNovelChapterList(@Path("fictionId") fictionId: String): Call<NovelChapterListBean?>

    //http://api.pingcc.cn/fictionContent/search/11194558
    @GET("fictionContent/search/{chapterId}")
    fun onGetNovelChapterContent(@Path("chapterId") chapterId: String): Call<NovelContentBean?>

//    //https://www.qiushibaike.com/text/page/2/
//    @GET("{type}/page/{index}/")
//    fun onGetJoke(@Path("type") type: String, @Path("index") index: Int): Call<String>
//
//    @GET("article/{id}")
//    fun onGetJokeText(@Path("id") id: String): Call<String>


//    @POST("test/uploadpic")
//    fun onUploadPic(@Body body: RequestBody): Call<String>

//    @FormUrlEncoded
//    @POST("loginV2/three_confirm")
//    fun onThirdLogin(@FieldMap map: Map<String, String>): Call<String>


//    @GET("comic/comic_{cid}_android.json")
//    fun onDetail(@Header("User-Agent") ua: String, @Path("cid") path: String, @QueryMap map: Map<String, String>): Call<String>

}